<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue v-if 强化</title>
</head>
<body>
<div id="app">

    <template >
        <div v-if="number === 1"> 等级1</div>
        <div v-else-if="number === 2">等级2</div>
        <div v-else>普通会员</div>
    </template>
</div>

<script src="../js/vue.js"></script>
<script>

    const message = {
        number : 2
    };

    //数据冻结, 禁止调试
    //Object.freeze(message)

    const demo = new Vue({
        el: '#app',
        data: message,
        methods: {},
        computed: {}
    });
</script>
</body>
</html>